-----------------------------------------------------------------------------
--
-- Module      :   Data.Unit.Type.Internal
-- Copyright   :
-- License     :  AllRightsReserved
--
-- Maintainer  :  Eduard Sergeev
-- Stability   :  Highly Experimental
-- Portability :
--
-- Type-level types manipulation not to be exposed (requires OverlappingInstances)
--
-----------------------------------------------------------------------------

{-# LANGUAGE MultiParamTypeClasses, TypeOperators, TypeFamilies,
FlexibleInstances, ScopedTypeVariables, UndecidableInstances, OverlappingInstances,
FlexibleContexts #-}


module Data.Unit.Type.Internal (

-- | Type-level Booleans
   HTrue,
   HFalse,

   AreEqual,

) where


data HTrue
data HFalse

instance Show HTrue where
    show _ = "HTrue"

instance Show HFalse where
    show _ = "HFalse"


-- | Comparison operation on Peano numbers
-- we need OverlappingInstances for this. Sorry.
class AreEqual a b r
instance (r ~ HTrue) => AreEqual a a r
instance (r ~ HFalse) => AreEqual a b r